<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>TreeModel | GoJS API</title>
	<meta name="description" content="Documentation for GoJS API">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../../assets/css/style.css">
	<link rel="stylesheet" href="../assets/css/main.css">
	<script async src="../assets/js/search.js" id="search-script"></script>
</head>
<body>
<header>
	<nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary">
		<div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2">
			<div class="md:pl-4">
				<a class="text-white hover:text-white no-underline hover:no-underline
				font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html">
				<h1 class="mb-0 p-1 leading-none">GoJS</h1>
				</a>
			</div>
			<button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation">
				<svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6">
					<path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path>
					<path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
				</svg>
			</button>
			<div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20">
				<ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0">
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html"
					target="_blank" rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/contact.html', 'contact');">Contact</a></li>
					<li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html"
					target="_blank"rel="noopener" onclick="getOutboundLink('https://www.nwoods.com/sales/index.html', 'buy');">Buy</a></li>
				</ul>
			</div>
		</div>
		<hr class="border-b border-gray-600 opacity-50 my-0 py-0" />
	</nav>
	<div class="tsd tsd-page-header">
		<div class="tsd-page-toolbar">
			<div class="w-full max-w-screen-xl mx-auto px-2">
				<div class="table-wrap">
					<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
						<div class="field">
							<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
							<input id="tsd-search-field" type="text" />
						</div>
						<ul class="results">
							<li class="state loading">Preparing search index...</li>
							<li class="state failure">The search index is not available</li>
						</ul>
						<a href="../index.html" class="title">GoJS API</a>
					</div>
					<div class="table-cell" id="tsd-widgets">
						<div id="tsd-filter">
							<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
							<div class="tsd-filter-group">
								<div class="tsd-select" id="tsd-filter-visibility">
									<span class="tsd-select-label">All</span>
									<ul class="tsd-select-list">
										<li data-value="public">Public</li>
										<li data-value="protected">Public/Protected</li>
										<li data-value="private" class="selected">All</li>
									</ul>
								</div>
							</div>
						</div>
						<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
					</div>
				</div>
			</div>
		</div>
		<div class="tsd tsd-page-title">
			<div class="w-full max-w-screen-xl mx-auto px-2">
				<div class="top-copyright">
					<b>GoJS</b>&reg; Diagramming Components<br/>version 2.1.56<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a>
				</div>
				<div>
					<h1>Class TreeModel</h1>
				</div>
			</div>
		</div>
	</div>
</header>
<div class="tsd w-full max-w-screen-xl mx-auto pb-4">
	<div class="row px-2 w-full">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<a href="Model.html" class="tsd-signature-type" data-tsd-kind="Class">Model</a>
						<ul class="tsd-hierarchy">
							<li>
								<span class="target">TreeModel</span>
							</li>
						</ul>
					</li>
				</ul>
			</section>
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
					<p>TreeModels support tree-structured graphs of nodes and links.
						Each node can have at most one &quot;tree parent&quot;; cycles are not permitted.
					The reference to the parent node&#39;s key is a property of the child node data.</p>
					<p>TreeModels, unlike <a href="GraphLinksModel.html">GraphLinksModel</a>s, do not support arbitrary link relationships between nodes,
						nor is there a separate link data object for each parent-child relationship.
					Furthermore there is no support for grouping or label nodes.</p>
					<p>The <a href="TreeModel.html#nodeParentKeyProperty">nodeParentKeyProperty</a> property names the property on the node data whose value
						is the key of the &quot;tree parent&quot; node.
					The default value for this property is &quot;parent&quot;.</p>
					<p>For example, one can define a graph consisting of one parent node with two child nodes:</p>
					<pre><code class="language-js"><span style="color: #D4D4D4"> </span><span style="color: #9CDCFE">model</span><span style="color: #D4D4D4">.</span><span style="color: #9CDCFE">nodeDataArray</span><span style="color: #D4D4D4"> = [</span>
<span style="color: #D4D4D4">   { </span><span style="color: #9CDCFE">key:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Alpha&quot;</span><span style="color: #D4D4D4"> },</span>
<span style="color: #D4D4D4">   { </span><span style="color: #9CDCFE">key:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Beta&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">parent:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Alpha&quot;</span><span style="color: #D4D4D4"> },</span>
<span style="color: #D4D4D4">   { </span><span style="color: #9CDCFE">key:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Gamma&quot;</span><span style="color: #D4D4D4">, </span><span style="color: #9CDCFE">parent:</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;Alpha&quot;</span><span style="color: #D4D4D4"> }</span>
<span style="color: #D4D4D4"> ];</span>
</code></pre>
					<p>If you need to show a more complicated graph structure than a tree, use a <a href="GraphLinksModel.html">GraphLinksModel</a>.
						If you want to have multiple links between the same pair of nodes,
						or if you want to associate more information with each link and cannot put the information on the child node,
						you will need to have a separate link data object for each link,
					and that would require the use of <a href="GraphLinksModel.html">GraphLinksModel</a>.</p>
					<dl class="tsd-comment-tags">
						<dt>since</dt>
						<dd><p>1.1</p>
						</dd>
					</dl>
				</div>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Constructors</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="TreeModel.html#constructor" class="tsd-kind-icon">constructor</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="TreeModel.html#nodeParentKeyProperty" class="tsd-kind-icon">node<wbr>Parent<wbr>Key<wbr>Property</a></li>
								<li class="tsd-kind-accessor tsd-parent-kind-class"><a href="TreeModel.html#parentLinkCategoryProperty" class="tsd-kind-icon">parent<wbr>Link<wbr>Category<wbr>Property</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Methods</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="TreeModel.html#copyNodeData" class="tsd-kind-icon">copy<wbr>Node<wbr>Data</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="TreeModel.html#getParentKeyForNodeData" class="tsd-kind-icon">get<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="TreeModel.html#getParentLinkCategoryForNodeData" class="tsd-kind-icon">get<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="TreeModel.html#setDataProperty" class="tsd-kind-icon">set<wbr>Data<wbr>Property</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="TreeModel.html#setParentKeyForNodeData" class="tsd-kind-icon">set<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="TreeModel.html#setParentLinkCategoryForNodeData" class="tsd-kind-icon">set<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Constructors</h2>
				<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
					<a name="constructor" class="tsd-anchor"></a>
					<h3>
						constructor
					</h3>
					<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">new <wbr>Tree<wbr>Model<span class="tsd-signature-symbol">(</span>nodedataarray<span class="tsd-signature-symbol">?: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="TreeModel.html" class="tsd-signature-type" data-tsd-kind="Class">TreeModel</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>This constructs an empty TreeModel unless one provides arguments as the initial data array values
								for the <a href="Model.html#nodeDataArray">Model.nodeDataArray</a> property.</p>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5><span class="tsd-flag ts-flagOptional">Optional</span> nodedataarray: <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a><span class="tsd-signature-symbol">[]</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>an optional Array containing JavaScript objects to be represented by Nodes.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="TreeModel.html" class="tsd-signature-type" data-tsd-kind="Class">TreeModel</a></h4>
						</li>
					</ul>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
					<a name="nodeParentKeyProperty" class="tsd-anchor"></a>
					<h3>
						node<wbr>Parent<wbr>Key<wbr>Property
					<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a>, b<span class="tsd-signature-symbol">?: </span><a href="../index.html#Key" class="tsd-signature-type" data-tsd-kind="Type alias">Key</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a href="../index.html#Key" class="tsd-signature-type" data-tsd-kind="Type alias">Key</a><span class="tsd-signature-symbol">)</span>        </h3>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Gets or sets the name of the property on node data that specifies
									the string or number key of the node data that acts as the &quot;parent&quot; for this &quot;child&quot; node data.
									The value may also be a function taking two arguments, where the first argument will be a node data object.
									If the second argument is not supplied, the function should return the string or number key for the parent node data object of which the given data object is a child;
									if the second argument is supplied, the function should modify the node data object so that it has that new key
									(which may be undefined to refer to no node) as the parent key for that node..
									The default value is the name &#39;parent&#39;, meaning that it expects the data to have a property named &#39;parent&#39; if the node wants to refer to the parent node by its key.
								The value must not be null nor an empty string.</p>
								<p>If you want to set this property you must do so before using the model, and especially before you assign <a href="Diagram.html#model">Diagram.model</a>.
									Note that functions cannot be serialized into JSON-formatted text, so if you are using <a href="Model.html#toJson">toJson</a> and <a href="Model.html#static-fromJson">Model.fromJson</a>,
									and if you want this property to be a function, you will need to assign this property to your desired function
								immediately after creating the model, including when it is created by <a href="Model.html#static-fromJson">Model.fromJson</a>.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="TreeModel.html#getParentKeyForNodeData">getParentKeyForNodeData</a>, <a href="TreeModel.html#setParentKeyForNodeData">setParentKeyForNodeData</a></p>
									</dd>
								</dl>
							</div>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class">
					<a name="parentLinkCategoryProperty" class="tsd-anchor"></a>
					<h3>
						parent<wbr>Link<wbr>Category<wbr>Property
					<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>a<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a>, b<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span>        </h3>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Gets or sets the name of the data property that returns a string describing that node data&#39;s parent link&#39;s category.
									The value may also be a function taking two arguments, where the first argument will be a node data object.
									If the second argument is not supplied, the function should return the category name for any parent link;
									if the second argument is supplied, the function should modify the node data object so that its parent link has that new category name.
									The default value is the name &#39;parentLinkCategory&#39;.
									This is used by the diagram to distinguish between different kinds of links.
									The name must not be null.
									If the value is an empty string,
								<a href="TreeModel.html#getParentLinkCategoryForNodeData">getParentLinkCategoryForNodeData</a> will return an empty string for all node data objects.</p>
								<p>If you want to set this property you must do so before using the model, and especially before you assign <a href="Diagram.html#model">Diagram.model</a>.
									Note that functions cannot be serialized into JSON-formatted text, so if you are using <a href="Model.html#toJson">toJson</a> and <a href="Model.html#static-fromJson">Model.fromJson</a>,
									and if you want this property to be a function, you will need to assign this property to your desired function
								immediately after creating the model, including when it is created by <a href="Model.html#static-fromJson">Model.fromJson</a>.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="TreeModel.html#getParentLinkCategoryForNodeData">getParentLinkCategoryForNodeData</a>, <a href="TreeModel.html#setParentLinkCategoryForNodeData">setParentLinkCategoryForNodeData</a></p>
									</dd>
								</dl>
							</div>
						</li>
					</ul>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Methods</h2>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
					<a name="copyNodeData" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagOverride">Override</span> <span class="tsd-flag ts-flagVirtual">Virtual</span>
						copy<wbr>Node<wbr>Data
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">copy<wbr>Node<wbr>Data<span class="tsd-signature-symbol">(</span>nodedata<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>This override also makes sure any copied node data does not have a reference to a parent node.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="Model.html#copyNodeData">Model.copyNodeData</a></p>
									</dd>
								</dl>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>nodedata: <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>a JavaScript object represented by a node, group, or non-link.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="getParentKeyForNodeData" class="tsd-anchor"></a>
					<h3>
						get<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">get<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data<span class="tsd-signature-symbol">(</span>nodedata<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../index.html#Key" class="tsd-signature-type" data-tsd-kind="Type alias">Key</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>If there is a parent node for the given node data, return the parent&#39;s key.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="TreeModel.html#nodeParentKeyProperty">nodeParentKeyProperty</a>, <a href="TreeModel.html#setParentKeyForNodeData">setParentKeyForNodeData</a></p>
									</dd>
								</dl>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>nodedata: <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>a JavaScript object represented by a node.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="../index.html#Key" class="tsd-signature-type" data-tsd-kind="Type alias">Key</a></h4>
							<p>This returns undefined if there is no parent node data object.</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="getParentLinkCategoryForNodeData" class="tsd-anchor"></a>
					<h3>
						get<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">get<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data<span class="tsd-signature-symbol">(</span>childdata<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Find the category for the parent link of a given child node data, a string naming the link template
								that the <a href="Diagram.html">Diagram</a> should use to represent the link.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="TreeModel.html#parentLinkCategoryProperty">parentLinkCategoryProperty</a>, <a href="TreeModel.html#setParentLinkCategoryForNodeData">setParentLinkCategoryForNodeData</a></p>
									</dd>
								</dl>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>childdata: <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>a JavaScript object represented by a node data.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
					<a name="setDataProperty" class="tsd-anchor"></a>
					<h3>
						<span class="tsd-flag ts-flagOverride">Override</span> <span class="tsd-flag ts-flagVirtual">Virtual</span>
						set<wbr>Data<wbr>Property
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
						<li class="tsd-signature tsd-kind-icon">set<wbr>Data<wbr>Property<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a>, propname<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, val<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>This override changes the value of some property of a node data or an item data, given a string naming the property
								and the new value, in a manner that can be undone/redone and that automatically updates any bindings.</p>
								<p>This gets the old value of the property; if the value is the same as the new value, no side-effects occur.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="Model.html#setDataProperty">Model.setDataProperty</a></p>
									</dd>
								</dl>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>data: <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>a JavaScript object typically the value of a <a href="Panel.html#data">Panel.data</a> and represented by a Node, Link, Group, simple Part,
										or item in a <a href="Panel.html#itemArray">Panel.itemArray</a>; or this model&#39;s <a href="Model.html#modelData">modelData</a>.</p>
									</div>
								</li>
								<li>
									<h5>propname: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>a string that is not null or the empty string.</p>
									</div>
								</li>
								<li>
									<h5>val: <span class="tsd-signature-type">any</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>the new value for the property.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="setParentKeyForNodeData" class="tsd-anchor"></a>
					<h3>
						set<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">set<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data<span class="tsd-signature-symbol">(</span>nodedata<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a>, key<span class="tsd-signature-symbol">: </span><a href="../index.html#Key" class="tsd-signature-type" data-tsd-kind="Type alias">Key</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Change the parent node for the given node data, given a key for the new parent, or undefined if there should be no parent.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="TreeModel.html#nodeParentKeyProperty">nodeParentKeyProperty</a>, <a href="TreeModel.html#getParentKeyForNodeData">getParentKeyForNodeData</a></p>
									</dd>
								</dl>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>nodedata: <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>a JavaScript object represented by a node.</p>
									</div>
								</li>
								<li>
									<h5>key: <a href="../index.html#Key" class="tsd-signature-type" data-tsd-kind="Type alias">Key</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>This may be undefined if there should be no parent node data.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="setParentLinkCategoryForNodeData" class="tsd-anchor"></a>
					<h3>
						set<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data
					</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">set<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data<span class="tsd-signature-symbol">(</span>childdata<span class="tsd-signature-symbol">: </span><a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a>, cat<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<div class="tsd-comment tsd-typography">
								<p>Change the category for the parent link of a given child node data, a string naming the link template
								that the <a href="Diagram.html">Diagram</a> should use to represent the link.</p>
								<p>Changing the link template will cause any existing <a href="Link.html">Link</a>
									to be removed from the <a href="Diagram.html">Diagram</a> and replaced with a new <a href="Link.html">Link</a>
									created by copying the new link template and applying any data-bindings.
									Note that the new template must be an instance of the same class as the original link.
									Thus one cannot change the category of a link from an instance of <a href="Link.html">Link</a>
								to an instance of a subclass of Link, nor vice-versa.</p>
								<dl class="tsd-comment-tags">
									<dt>see</dt>
									<dd><p><a href="TreeModel.html#parentLinkCategoryProperty">parentLinkCategoryProperty</a>, <a href="TreeModel.html#getParentLinkCategoryForNodeData">getParentLinkCategoryForNodeData</a></p>
									</dd>
								</dl>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>childdata: <a href="ObjectData.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectData</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>a JavaScript object represented by a node data.</p>
									</div>
								</li>
								<li>
									<h5>cat: <span class="tsd-signature-type">string</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>Must not be null.</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class=" ">
						<a href="../index.html">GoJS <wbr>Class <wbr>Index</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-class">
						<a href="TreeModel.html" class="tsd-kind-icon">Tree<wbr>Model</a>
						<ul>
							<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
								<a href="TreeModel.html#constructor" class="tsd-kind-icon">constructor</a>
							</li>
							<li class=" tsd-kind-accessor tsd-parent-kind-class">
								<a href="TreeModel.html#nodeParentKeyProperty" class="tsd-kind-icon">node<wbr>Parent<wbr>Key<wbr>Property</a>
							</li>
							<li class=" tsd-kind-accessor tsd-parent-kind-class">
								<a href="TreeModel.html#parentLinkCategoryProperty" class="tsd-kind-icon">parent<wbr>Link<wbr>Category<wbr>Property</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a href="TreeModel.html#copyNodeData" class="tsd-kind-icon">copy<wbr>Node<wbr>Data</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="TreeModel.html#getParentKeyForNodeData" class="tsd-kind-icon">get<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="TreeModel.html#getParentLinkCategoryForNodeData" class="tsd-kind-icon">get<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a href="TreeModel.html#setDataProperty" class="tsd-kind-icon">set<wbr>Data<wbr>Property</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="TreeModel.html#setParentKeyForNodeData" class="tsd-kind-icon">set<wbr>Parent<wbr>Key<wbr>For<wbr>Node<wbr>Data</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="TreeModel.html#setParentLinkCategoryForNodeData" class="tsd-kind-icon">set<wbr>Parent<wbr>Link<wbr>Category<wbr>For<wbr>Node<wbr>Data</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<div class="tsd w-full max-w-screen-xl mx-auto px-2">
	<div class="bottom-copyright">Copyright &copy; 1998-2021 by Northwoods Software Corporation.</div>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-1506307-5"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date()); gtag('config', 'UA-1506307-5');
  var getOutboundLink = function(url, label) {
    gtag('event', 'click', {
      'event_category': 'outbound',
      'event_label': label,
      'transport_type': 'beacon'
    });
  }

  // topnav
  var topButton = document.getElementById("topnavButton");
  var topnavList = document.getElementById("topnavList");
  topButton.addEventListener("click", function() {
    this.classList.toggle("active");
    topnavList.classList.toggle("hidden");
    document.getElementById("topnavOpen").classList.toggle("hidden");
    document.getElementById("topnavClosed").classList.toggle("hidden");
  });
</script>
</body>
</html>